Skip to content

feat(docs): add documentation for doc-kit#889

Open
bmuenzenmeyer wants to merge 18 commits into
mainfrom
doc-kit-docs
Open

feat(docs): add documentation for doc-kit#889
bmuenzenmeyer wants to merge 18 commits into
mainfrom
doc-kit-docs

Conversation

@bmuenzenmeyer

@bmuenzenmeyer bmuenzenmeyer commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

Introduces the doc-kit documentation site, built with doc-kit!
This also serves as a reasonable simple web example.

Validation

npm run docs:build
npx serve www/out
image

Getting started suggestion end-state

image

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Jul 12, 2026 3:51am

Request Review

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 260 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.87%. Comparing base (d7bdf39) to head (3f035e7).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
www/theme/SideBar.jsx 0.00% 103 Missing ⚠️
scripts/build-docs-content.mjs 0.00% 82 Missing ⚠️
www/doc-kit.config.mjs 0.00% 75 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #889      +/-   ##
==========================================
- Coverage   85.04%   83.87%   -1.18%     
==========================================
  Files         179      183       +4     
  Lines       16496    16826     +330     
  Branches     1500     1513      +13     
==========================================
+ Hits        14029    14112      +83     
- Misses       2457     2704     +247     
  Partials       10       10              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

web Generator

File Base Head Diff
all.html 19.94 MB 19.94 MB -234.00 B (-0.00%)

@AugustinMauroy AugustinMauroy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice !

also we should add a "why doc-kit" section but with a "TBD" and in future have comparison with fuma-docs/docausorus ...

Comment thread www/pages/index.md Outdated
Comment thread www/pages/index.md Outdated
Comment thread www/pages/index.md Outdated
Comment thread www/doc-kit.config.mjs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I recall correctly on this file we can customize the color theme.
And IMO we should change it. Why not keep green ? this green will be understood as nodejs runtime related. so for undici, learn it's work well. But if we want to as general propose tool we should chose another colors.
Also it's good example of how can this be customized.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted to re-write the custom-properties. i dont think head theme is enough, AFAIK
I purposely made a couple other customizations

image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

humm intresting

Comment thread .github/workflows/docs.yml Outdated
Comment on lines +44 to +48
- name: Upload site artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: docs-site
path: www/out

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if we deploy the docs on GH page ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont have strong opinions here other that continuing our current patterns.

@bmuenzenmeyer bmuenzenmeyer marked this pull request as ready for review July 12, 2026 02:20
@bmuenzenmeyer bmuenzenmeyer requested a review from a team as a code owner July 12, 2026 02:20
@cursor

cursor Bot commented Jul 12, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Docs-only build pipeline, config, and markdown heading tweaks; no changes to core generator runtime behavior beyond what the site build invokes.

Overview
Adds a documentation site built with doc-kit’s own web and orama-db targets, plus CI that verifies the build on every PR and push to main.

A new docs:build flow runs scripts/build-docs-content.mjs to merge www/pages/*.md, root docs/*.md, and each generator’s README.md into gitignored www/content/, then generates static output under www/out/ via www/doc-kit.config.mjs (flat URLs, no synthetic Node.js index page, custom meta, repo-level edit link). GitHub Actions (docs.yml) runs npm ci and node --run docs:build, uploading www/out as an artifact.

Authoring includes new home and getting-started pages and a custom SideBar that splits “Pages” vs “Generators”, fixes guide order, and renders backtick headings as inline code. Generator READMEs are retitled from ## to # so they read correctly when pulled into the site. Minor tooling tweaks: ignore/format www/content, Prettier proseWrap for www/pages, and a target example in docs/configuration.md.

Reviewed by Cursor Bugbot for commit 3f035e7. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread scripts/vercel-docs-build.sh Outdated

node bin/cli.mjs generate \
--config-file ./www/doc-kit.config.mjs \
--log-level info

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build script ignores content failure

High Severity

The docs build shell script runs content assembly and doc-kit generate as separate commands without failing fast. If build-docs-content.mjs exits non-zero, the generator still runs, so node --run docs:build and CI can succeed with missing or stale www/content/.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0f9fb0f. Configure here.

Comment thread www/doc-kit.config.mjs
links: [],
html: [],
},
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node banner on doc-kit site

Medium Severity

The documentation site config customizes web branding but leaves the default remoteConfigUrl pointing at nodejs.org. The layout still loads remote Node.js announcement banners on the doc-kit docs site instead of a neutral or empty banner config.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0f9fb0f. Configure here.

@avivkeller avivkeller changed the title Doc kit docs feat(docs): add documentation for doc-kit Jul 12, 2026
Comment thread www/pages/getting-started.md
*
* @returns {Promise<Array<{ name: string, markdown: string }>>}
*/
const collectPages = async () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use a glob for this?

**/*.md?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont have strong opinions either way, but knew that i

  • wanted to clean out
  • load very specific subset of three possible patterns, but perhaps not other future markdown.

Comment thread scripts/vercel-docs-build.sh Outdated
Comment on lines +36 to +37
The `legacy-html-all` target has no additional dependencies and is the quickest
way to see output:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "no additional dependencies" mean? It depends on other generators (e.g. AST)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to run in the browser. it's html

Comment thread www/pages/getting-started.md Outdated
Comment thread www/pages/getting-started.md Outdated
- [Further customize the `web` generator](./generator-web) — check out more
customization options
- [Read the full input specification](./specification) — the full Markdown
contract. components.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's . components.?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol can you tell i am typing this while watching the world cup?

Comment thread www/pages/index.md Outdated
Comment thread www/pages/index.md Outdated
Comment thread www/pages/index.md Outdated
Comment thread www/doc-kit.config.mjs
Comment on lines +55 to +59
// Pages are assembled into `www/content/` at build time, so there is no
// single source file a `{path}` template could point at. Link to the repo
// instead; a per-page link would need a `#theme/Metabar` override that maps
// each slug back to its true origin.
editURL: `https://github.com/${REPOSITORY}`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also leave this blank to remove the link entirely

bmuenzenmeyer and others added 4 commits July 11, 2026 22:21
Co-authored-by: Aviv Keller <me@aviv.sh>
Co-authored-by: Aviv Keller <me@aviv.sh>
Co-authored-by: Aviv Keller <me@aviv.sh>
Co-authored-by: Aviv Keller <me@aviv.sh>
Co-authored-by: Aviv Keller <me@aviv.sh>

await Promise.all(
pages.map(({ name, markdown }) => writeFile(join(CONTENT, name), markdown))
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Silent duplicate content filenames

Medium Severity

collectPages merges www/pages, docs, and generator READMEs into one list keyed only by basename. Two sources with the same .md filename write to one path with no warning; whichever write finishes last wins and the other source’s page disappears from the built site.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b714583. Configure here.

Co-authored-by: Aviv Keller <me@aviv.sh>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 4 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3f035e7. Configure here.

Comment thread scripts/build-docs-content.mjs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing link to orama docs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a good follow up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants